import { View } from "../../../../mvc/core/View";
import { PetProcessBar } from "../../pet/PetProcessBar";
import { ObjCreate } from "../../common/ObjCreate";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { EffectManager } from "../../../manager/EffectManager";
import { FilterConst } from "../../../../component/gconst/FilterConst";
type int = number;
//class ProgressBarWithLvItem
    
    export  class ProgressBarWithLvItem extends View
    {
        constructor(arg1: string, arg2: string="RedBar10", arg3: int=150, arg4: int=12)
        {
            super();
            this._bar = new PetProcessBar(arg2, arg3, arg4);
            this._bar.move(140, 4);
            addChild(this._bar);
            this._attTx = ObjCreate.createGTextField(arg1, 0, 0, 85, 20, this);
            this._lvTx = ObjCreate.createGTextField("", 80, 0, 56, 20, this, GlobalStyle.textFormat2);
            this._lvTx.autoSize = flash.text.TextFieldAutoSize.CENTER;
            return;
        }

        public setLvTx(arg1: int): void
        {
            this._lvTx.text = "Lv." + arg1.toString();
            return;
        }

        public setBarValue(arg1: int, arg2: int): void
        {
            this._bar.setValue(arg1, arg2);
            return;
        }

        public shine(): void
        {
            EffectManager.glowFilterReg(this._bar, [FilterConst.chatTipsFilter], 0.4, 4, 2, 3);
            return;
        }

        /* internal */ /* var */_bar: PetProcessBar;

        /* internal */ /* var */_attTx: Object /* flash.text.TextField */;

        /* internal */ /* var */_lvTx: Object /* flash.text.TextField */;
    }
